home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / TextServices.a < prev    next >
Text File  |  1996-05-01  |  23KB  |  960 lines

  1. ;
  2. ;    File:        TextServices.a
  3. ;
  4. ;    Contains:    Text Services Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__TEXTSERVICES__') = 'UNDEFINED' THEN
  19. __TEXTSERVICES__ SET 1
  20.  
  21.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  22.     include 'ConditionalMacros.a'
  23.     ENDIF
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  28.     include 'Events.a'
  29.     ENDIF
  30.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  31.     include 'Menus.a'
  32.     ENDIF
  33.     IF &TYPE('__AEDATAMODEL__') = 'UNDEFINED' THEN
  34.     include 'AEDataModel.a'
  35.     ENDIF
  36.     IF &TYPE('__AEREGISTRY__') = 'UNDEFINED' THEN
  37.     include 'AERegistry.a'
  38.     ENDIF
  39.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  40.     include 'Components.a'
  41.     ENDIF
  42.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  43.     IF &TYPE('__TEXTOBJECTS__') = 'UNDEFINED' THEN
  44.     include 'TextObjects.a'
  45.     ENDIF
  46.     IF &TYPE('__LOCALEOBJECTS__') = 'UNDEFINED' THEN
  47.     include 'LocaleObjects.a'
  48.     ENDIF
  49.     IF &TYPE('__COLLECTIONS__') = 'UNDEFINED' THEN
  50.     include 'Collections.a'
  51.     ENDIF
  52.     IF &TYPE('__HILISTTYPES__') = 'UNDEFINED' THEN
  53.     include 'HIListTypes.a'
  54.     ENDIF
  55.     IF &TYPE('__HIWINDOWTYPES__') = 'UNDEFINED' THEN
  56.     include 'HIWindowTypes.a'
  57.     ENDIF
  58.     ENDIF
  59.     IF FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE THEN
  60.  
  61. kTextService                    EQU        'tsvc'                ; component type for the component description 
  62. kInputMethodService                EQU        'inpm'                ; component subtype for the component description 
  63. kTSMVersion                        EQU        $0200                ; Version of the Text Services Manager is 2.0  
  64. kTextServiceVersion2            EQU        'tsv2'                ; Interface type for V2 interfaces 
  65. ;  Standard collection tags
  66.  
  67. kInteractiveServicesTag            EQU        'tmin'
  68. kLocaleIDTag                    EQU        'loce'
  69. kTextInputObjectTag                EQU        'tiot'
  70. kLocaleObjectRefTag                EQU        'lobj'
  71. kLocaleRefTag                    EQU        'lref'
  72. kKeyboardInputMethodContextTag    EQU        'kinp'
  73. kKeyboardLocaleObjectRefTag        EQU        'kilo'
  74. kHandwritingInputMethodContextTag EQU    'hinp'
  75. kHandwritingLocaleObjectRefTag    EQU        'hilo'
  76. kSpeechInputMethodContextTag    EQU        'sinp'
  77. kSpeechLocaleObjectRefTag        EQU        'silo'
  78. kPasswordModeTag                EQU        'pwdm'
  79. kRefconTag                        EQU        'refc'
  80. kUseFloatingWindowTag            EQU        'uswm'
  81. kReadOnlyDocumentTag            EQU        'isro'
  82. kSupportsMultiInlineHolesTag    EQU        'minl'
  83. kProtocolVersionTag                EQU        'nprt'
  84. kTSMContextCollectionTag        EQU        'tsmx'
  85. ;  Standard tags for input method modes
  86.  
  87. kIMRomanInputMode                EQU        'romn'
  88. kIMPasswordInputMode            EQU        'pasw'
  89. kIMXingInputMode                EQU        'xing'
  90. kIMHuaInputMode                    EQU        'huam'
  91. kIMPinyinInputMode                EQU        'piny'
  92. kIMQuweiInputMode                EQU        'quwe'
  93. kIMCangjieInputMode                EQU        'cgji'
  94. kIMJianyiInputMode                EQU        'jnyi'
  95. kIMZhuyinInputMode                EQU        'zhuy'
  96. kIMB5CodeInputMode                EQU        'b5cd'
  97. kIMKatakanaInputMode            EQU        'kata'
  98. kIMHiraganaInputMode            EQU        'hira'
  99. ;  Variant tags for the input modes
  100.  
  101. kIM2ByteInputMode                EQU        '2byt'
  102. kIM1ByteInputMode                EQU        '1byt'
  103. kIMDirectInputMode                EQU        'dinp'
  104. ;  Text Services LocaleObject Attributes
  105.  
  106. kNeedsInputWindow                EQU        1
  107. kHandlesUpdateRegion            EQU        2
  108. kHandlesGetRegion                EQU        3
  109. kHandlesPos2Offset                EQU        4
  110. kHandlesOffset2Pos                EQU        5
  111. kInPasswordMode                    EQU        6
  112. kHandleMultipleHoles            EQU        7
  113. kDocumentIsReadOnly                EQU        8
  114.     ENDIF
  115.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  116.  
  117.                                                             ; Component Flags in ComponentDescription 
  118. bTakeActiveEvent                EQU        15                    ; bit set if the component takes active event 
  119. bHandleAERecording                EQU        16                    ; bit set if the component takes care of recording Apple Events <new in vers2.0> 
  120. bScriptMask                        EQU        $00007F00            ; bit 8 - 14 
  121. bLanguageMask                    EQU        $000000FF            ; bit 0 - 7  
  122. bScriptLanguageMask                EQU        $00007FFF            ; bit 0 - 14  
  123.  
  124.                                                             ; Low level routines which are dispatched directly to the Component Manager 
  125. kCMGetScriptLangSupport            EQU        $0001                ; Component Manager call selector 1 
  126. kCMInitiateTextService            EQU        $0002                ; Component Manager call selector 2 
  127. kCMTerminateTextService            EQU        $0003                ; Component Manager call selector 3 
  128. kCMActivateTextService            EQU        $0004                ; Component Manager call selector 4 
  129. kCMDeactivateTextService        EQU        $0005                ; Component Manager call selector 5 
  130. kCMTextServiceEvent                EQU        $0006                ; Component Manager call selector 6 
  131. kCMGetTextServiceMenu            EQU        $0007                ; Component Manager call selector 7 
  132. kCMTextServiceMenuSelect        EQU        $0008                ; Component Manager call selector 8 
  133. kCMFixTextService                EQU        $0009                ; Component Manager call selector 9 
  134. kCMSetTextServiceCursor            EQU        $000A                ; Component Manager call selector 10 
  135. kCMHidePaletteWindows            EQU        $000B                ; Component Manager call selector 11 
  136.     ENDIF
  137.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  138. TSMServiceSpecification    RECORD 0
  139. objectName                 ds.l    1                ; offset: $0 (0)
  140. countPairs                 ds.l    1                ; offset: $4 (4)
  141. pairs                     ds.l    1                ; offset: $8 (8)
  142. sizeof                     EQU *                    ; size:   $C (12)
  143.                         ENDR
  144. ; typedef struct TSMServiceSpecification * TSMServiceSpecificationPtr
  145.  
  146. ;  New opaque definitions for types
  147.  
  148.  
  149.  
  150.  
  151.     ENDIF
  152.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  153. ;  New opaque definitions for types
  154.  
  155.  
  156. InterfaceTypeList        RECORD 0
  157. elements                 ds.l    1
  158. sizeof                     EQU *                    ; size:   $4 (4)
  159.                         ENDR
  160.  
  161.  
  162.     ENDIF
  163.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  164. ;  Text Service Info List 
  165. TextServiceInfo            RECORD 0
  166. fComponent                 ds.l    1                ; offset: $0 (0)
  167. fItemName                 ds        Str255            ; offset: $4 (4)
  168. sizeof                     EQU *                    ; size:   $104 (260)
  169.                         ENDR
  170. ; typedef struct TextServiceInfo *        TextServiceInfoPtr
  171.  
  172. TextServiceList            RECORD 0
  173. fTextServiceCount         ds.w    1                ; offset: $0 (0)        ;  number of entries in the 'fServices' array 
  174. fServices                 ds        TextServiceInfo ; offset: $2 (2) <-- really an array of length one ;  Note: array of 'TextServiceInfo' records follows 
  175. sizeof                     EQU *                    ; size:   $106 (262)
  176.                         ENDR
  177. ; typedef struct TextServiceList *        TextServiceListPtr
  178.  
  179. ; typedef TextServiceListPtr *            TextServiceListHandle
  180.  
  181. ScriptLanguageRecord    RECORD 0
  182. fScript                     ds.w    1                ; offset: $0 (0)
  183. fLanguage                 ds.w    1                ; offset: $2 (2)
  184. sizeof                     EQU *                    ; size:   $4 (4)
  185.                         ENDR
  186. ScriptLanguageSupport    RECORD 0
  187. fScriptLanguageCount     ds.w    1                ; offset: $0 (0)        ;  number of entries in the 'fScriptLanguageArray' array 
  188. fScriptLanguageArray     ds        ScriptLanguageRecord ; offset: $2 (2) <-- really an array of length one ;  Note: array of 'ScriptLanguageRecord' records follows 
  189. sizeof                     EQU *                    ; size:   $6 (6)
  190.                         ENDR
  191. ; typedef struct ScriptLanguageSupport * ScriptLanguageSupportPtr
  192.  
  193. ; typedef ScriptLanguageSupportPtr *    ScriptLanguageSupportHandle
  194.  
  195.     ENDIF
  196.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  197. ;  Low level TSMContext routines 
  198. ;
  199. ; extern OSStatus NewTSMContext(TSMContext *context, LocaleRef locale, long refcon)
  200. ;
  201.     IF GENERATINGCFM THEN
  202.         IMPORT_CFM_FUNCTION NewTSMContext
  203.     ENDIF
  204.  
  205. ;
  206. ; extern OSStatus DeleteTSMContext(TSMContext context)
  207. ;
  208.     IF GENERATINGCFM THEN
  209.         IMPORT_CFM_FUNCTION DeleteTSMContext
  210.     ENDIF
  211.  
  212. ;
  213. ; extern OSStatus OpenTSMService(TSMContext context, LocaleObjectRef service)
  214. ;
  215.     IF GENERATINGCFM THEN
  216.         IMPORT_CFM_FUNCTION OpenTSMService
  217.     ENDIF
  218.  
  219. ;
  220. ; extern OSStatus CloseTSMService(TSMContext context)
  221. ;
  222.     IF GENERATINGCFM THEN
  223.         IMPORT_CFM_FUNCTION CloseTSMService
  224.     ENDIF
  225.  
  226. ;
  227. ; extern OSStatus GetTSMService(TSMContext context, TSMServiceSpecification *serviceSpec, LocaleObjectRef *service)
  228. ;
  229.     IF GENERATINGCFM THEN
  230.         IMPORT_CFM_FUNCTION GetTSMService
  231.     ENDIF
  232.  
  233. ;
  234. ; extern OSStatus NextTSMService(TSMContext context, LocaleObjectRef *service)
  235. ;
  236.     IF GENERATINGCFM THEN
  237.         IMPORT_CFM_FUNCTION NextTSMService
  238.     ENDIF
  239.  
  240. ;
  241. ; extern OSStatus GetTSMRefcon(TSMContext context, long *refcon)
  242. ;
  243.     IF GENERATINGCFM THEN
  244.         IMPORT_CFM_FUNCTION GetTSMRefcon
  245.     ENDIF
  246.  
  247. ;
  248. ; extern OSStatus SetTSMRefcon(TSMContext context, long refcon)
  249. ;
  250.     IF GENERATINGCFM THEN
  251.         IMPORT_CFM_FUNCTION SetTSMRefcon
  252.     ENDIF
  253.  
  254. ;
  255. ; extern OSStatus GetTSMLocale(TSMContext context, LocaleRef *locale)
  256. ;
  257.     IF GENERATINGCFM THEN
  258.         IMPORT_CFM_FUNCTION GetTSMLocale
  259.     ENDIF
  260.  
  261. ;
  262. ; extern OSStatus SetTSMLocale(TSMContext context, LocaleRef locale)
  263. ;
  264.     IF GENERATINGCFM THEN
  265.         IMPORT_CFM_FUNCTION SetTSMLocale
  266.     ENDIF
  267.  
  268. ;
  269. ; extern void *GetSOMObjectFromTSMContext(TSMContext context)
  270. ;
  271.     IF GENERATINGCFM THEN
  272.         IMPORT_CFM_FUNCTION GetSOMObjectFromTSMContext
  273.     ENDIF
  274.  
  275. ;
  276. ; extern OSStatus AddTSMContextCollectionItem(TSMContext context, CollectionTag itemTag, UInt32 id, ByteCount itemSize, void *itemData)
  277. ;
  278.     IF GENERATINGCFM THEN
  279.         IMPORT_CFM_FUNCTION AddTSMContextCollectionItem
  280.     ENDIF
  281.  
  282. ;
  283. ; extern OSStatus GetTSMContextCollectionItemData(TSMContext context, CollectionTag tag, UInt32 id, ByteCount sizeAllowed, ByteCount *sizeReturned, void *itemData)
  284. ;
  285.     IF GENERATINGCFM THEN
  286.         IMPORT_CFM_FUNCTION GetTSMContextCollectionItemData
  287.     ENDIF
  288.  
  289. ;
  290. ; extern OSStatus RemoveTSMContextCollectionItem(TSMContext context, CollectionTag itemTag, UInt32 id)
  291. ;
  292.     IF GENERATINGCFM THEN
  293.         IMPORT_CFM_FUNCTION RemoveTSMContextCollectionItem
  294.     ENDIF
  295.  
  296.     ENDIF
  297.     IF FOR_SYSTEM8_COOPERATIVE THEN
  298. ;  Text Service Info List 
  299. InlineEditInfo            RECORD 0
  300. fStart                     ds.l    1                ; offset: $0 (0)
  301. fEnd                     ds.l    1                ; offset: $4 (4)
  302. fText                     ds.l    1                ; offset: $8 (8)
  303. sizeof                     EQU *                    ; size:   $C (12)
  304.                         ENDR
  305. ; typedef struct InlineEditInfo *        InlineEditInfoPtr
  306.  
  307. ;  New handler routines 
  308. ;
  309. ; extern OSStatus SetTSMEnabled(Boolean state)
  310. ;
  311.     IF GENERATINGCFM THEN
  312.         IMPORT_CFM_FUNCTION SetTSMEnabled
  313.     ENDIF
  314.  
  315. ;
  316. ; extern OSStatus SetTSMDocumentPasswordMode(TSMDocumentID idocID, Boolean Enabled)
  317. ;
  318.     IF GENERATINGCFM THEN
  319.         IMPORT_CFM_FUNCTION SetTSMDocumentPasswordMode
  320.     ENDIF
  321.  
  322. ;
  323. ; extern OSStatus AddTSMDocumentCollectionItem(TSMDocumentID idocID, CollectionTag itemTag, UInt32 id, ByteCount itemSize, void *itemData)
  324. ;
  325.     IF GENERATINGCFM THEN
  326.         IMPORT_CFM_FUNCTION AddTSMDocumentCollectionItem
  327.     ENDIF
  328.  
  329. ;
  330. ; extern OSStatus GetTSMDocumentCollectionItemData(TSMDocumentID idocID, CollectionTag tag, UInt32 id, ByteCount sizeAllowed, ByteCount *sizeReturned, void *itemData)
  331. ;
  332.     IF GENERATINGCFM THEN
  333.         IMPORT_CFM_FUNCTION GetTSMDocumentCollectionItemData
  334.     ENDIF
  335.  
  336. ;
  337. ; extern OSStatus RemoveTSMDocumentCollectionItem(TSMDocumentID idocID, CollectionTag itemTag, UInt32 id)
  338. ;
  339.     IF GENERATINGCFM THEN
  340.         IMPORT_CFM_FUNCTION RemoveTSMDocumentCollectionItem
  341.     ENDIF
  342.  
  343. ;
  344. ; extern OSStatus ReleaseTSMDocumentInlineHoles(TSMDocumentID idocID)
  345. ;
  346.     IF GENERATINGCFM THEN
  347.         IMPORT_CFM_FUNCTION ReleaseTSMDocumentInlineHoles
  348.     ENDIF
  349.  
  350. ;  Low level TSMContext routines 
  351. ;
  352. ; extern OSStatus FixTSMContext(TSMContext context)
  353. ;
  354.     IF GENERATINGCFM THEN
  355.         IMPORT_CFM_FUNCTION FixTSMContext
  356.     ENDIF
  357.  
  358. ;
  359. ; extern OSStatus ActivateTSMContext(TSMContext context)
  360. ;
  361.     IF GENERATINGCFM THEN
  362.         IMPORT_CFM_FUNCTION ActivateTSMContext
  363.     ENDIF
  364.  
  365. ;
  366. ; extern OSStatus DeactivateTSMContext(TSMContext context)
  367. ;
  368.     IF GENERATINGCFM THEN
  369.         IMPORT_CFM_FUNCTION DeactivateTSMContext
  370.     ENDIF
  371.  
  372.     IF FOR_PTR_BASED_AE THEN
  373. ;
  374. ; extern OSStatus EditInlineRegion(TSMContext context, AppleEvent *theEvent)
  375. ;
  376.     IF GENERATINGCFM THEN
  377.         IMPORT_CFM_FUNCTION EditInlineRegion
  378.     ENDIF
  379.  
  380.     ENDIF
  381. ;
  382. ; extern OSStatus ReleaseTSMContextInlineHoles(TSMContext context)
  383. ;
  384.     IF GENERATINGCFM THEN
  385.         IMPORT_CFM_FUNCTION ReleaseTSMContextInlineHoles
  386.     ENDIF
  387.  
  388. ;
  389. ; extern OSStatus TSMContextUseFloatingWindow(TSMContext context, Boolean useWindow)
  390. ;
  391.     IF GENERATINGCFM THEN
  392.         IMPORT_CFM_FUNCTION TSMContextUseFloatingWindow
  393.     ENDIF
  394.  
  395. ;
  396. ; extern OSStatus TSMContextSetPasswordMode(TSMContext context, Boolean Enabled)
  397. ;
  398.     IF GENERATINGCFM THEN
  399.         IMPORT_CFM_FUNCTION TSMContextSetPasswordMode
  400.     ENDIF
  401.  
  402. ;
  403. ; extern Boolean GetTSMFeature(TSMContext context, UInt32 feature)
  404. ;
  405.     IF GENERATINGCFM THEN
  406.         IMPORT_CFM_FUNCTION GetTSMFeature
  407.     ENDIF
  408.  
  409. ;
  410. ; extern HILayerRef GetTSMHILayer(void )
  411. ;
  412.     IF GENERATINGCFM THEN
  413.         IMPORT_CFM_FUNCTION GetTSMHILayer
  414.     ENDIF
  415.  
  416. ;  Text service developer API's 
  417. ;
  418. ; extern OSStatus TSMRegisterMenu(TSMContext context, HIMenu *menu)
  419. ;
  420.     IF GENERATINGCFM THEN
  421.         IMPORT_CFM_FUNCTION TSMRegisterMenu
  422.     ENDIF
  423.  
  424.     IF FOR_PTR_BASED_AE THEN
  425. ;
  426. ; extern OSStatus GetTSMUpdateEvent(AppleEvent **theAppleEvent, TSMContext context, TextObject theText, long fixLen, ReplaceRangeArrayPtr updateRng, HiliteRangeArrayPtr hiliteRng, ClauseOffsetArrayPtr clauseRgn, TextRegionRangePtr pinRange, UInt32 InlineHoleID)
  427. ;
  428.     IF GENERATINGCFM THEN
  429.         IMPORT_CFM_FUNCTION GetTSMUpdateEvent
  430.     ENDIF
  431.  
  432. ;
  433. ; extern OSStatus GetTSMPosToOffsetEvent(AppleEvent **theAppleEvent, TSMContext context, Point point, Boolean Dragging)
  434. ;
  435.     IF GENERATINGCFM THEN
  436.         IMPORT_CFM_FUNCTION GetTSMPosToOffsetEvent
  437.     ENDIF
  438.  
  439. ;
  440. ; extern OSStatus GetTSMOffsetToPosEvent(AppleEvent **theAppleEvent, TSMContext context, ByteOffset offset, UInt32 InlineHoleID)
  441. ;
  442.     IF GENERATINGCFM THEN
  443.         IMPORT_CFM_FUNCTION GetTSMOffsetToPosEvent
  444.     ENDIF
  445.  
  446. ;
  447. ; extern OSStatus GetTSMGetRegionEvent(AppleEvent **theAppleEvent, TSMContext context, GetRegionClass requestType, GetRegionRangePtr requestRange, UInt32 InlineHoleID)
  448. ;
  449.     IF GENERATINGCFM THEN
  450.         IMPORT_CFM_FUNCTION GetTSMGetRegionEvent
  451.     ENDIF
  452.  
  453. ;
  454. ; extern OSStatus GetTSMShowHideWindowEvent(AppleEvent **theAppleEvent, TSMContext context, Boolean showIt, Boolean InquireState)
  455. ;
  456.     IF GENERATINGCFM THEN
  457.         IMPORT_CFM_FUNCTION GetTSMShowHideWindowEvent
  458.     ENDIF
  459.  
  460. ;
  461. ; extern OSStatus GetTSMServiceChangedEvent(AppleEvent **theAppleEvent, TSMContext context)
  462. ;
  463.     IF GENERATINGCFM THEN
  464.         IMPORT_CFM_FUNCTION GetTSMServiceChangedEvent
  465.     ENDIF
  466.  
  467. ;
  468. ; extern OSStatus GetTSMReplyEvent(AppleEvent **theAppleEvent, TSMContext context)
  469. ;
  470.     IF GENERATINGCFM THEN
  471.         IMPORT_CFM_FUNCTION GetTSMReplyEvent
  472.     ENDIF
  473.  
  474. ;
  475. ; extern OSStatus AESendFromTSMService(TSMContext context, const AppleEvent *theAppleEvent, AppleEvent *reply)
  476. ;
  477.     IF GENERATINGCFM THEN
  478.         IMPORT_CFM_FUNCTION AESendFromTSMService
  479.     ENDIF
  480.  
  481.     ENDIF
  482. ;
  483. ; extern OSStatus PostTSMText(TSMContext context, TextObject text)
  484. ;
  485.     IF GENERATINGCFM THEN
  486.         IMPORT_CFM_FUNCTION PostTSMText
  487.     ENDIF
  488.  
  489. ;
  490. ; extern OSStatus GetTSMFloatingWindowGlobalRect(TSMContext context, Rect *globalRect)
  491. ;
  492.     IF GENERATINGCFM THEN
  493.         IMPORT_CFM_FUNCTION GetTSMFloatingWindowGlobalRect
  494.     ENDIF
  495.  
  496.     ENDIF
  497.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  498. ;  High level TSM Doucment routines 
  499. ;
  500. ; pascal OSErr NewTSMDocument(short numOfInterface, InterfaceTypeList supportedInterfaceTypes, TSMDocumentID *idocID, long refcon)
  501. ;
  502.     IF ¨ GENERATINGCFM THEN
  503.         Macro
  504.         _NewTSMDocument
  505.             moveq               #0,D0
  506.             dc.w                $AA54
  507.         EndM
  508.     ELSE
  509.         IMPORT_CFM_FUNCTION NewTSMDocument
  510.     ENDIF
  511.  
  512. ;
  513. ; pascal OSErr DeleteTSMDocument(TSMDocumentID idocID)
  514. ;
  515.     IF ¨ GENERATINGCFM THEN
  516.         Macro
  517.         _DeleteTSMDocument
  518.             moveq               #1,D0
  519.             dc.w                $AA54
  520.         EndM
  521.     ELSE
  522.         IMPORT_CFM_FUNCTION DeleteTSMDocument
  523.     ENDIF
  524.  
  525. ;
  526. ; pascal OSErr ActivateTSMDocument(TSMDocumentID idocID)
  527. ;
  528.     IF ¨ GENERATINGCFM THEN
  529.         Macro
  530.         _ActivateTSMDocument
  531.             moveq               #2,D0
  532.             dc.w                $AA54
  533.         EndM
  534.     ELSE
  535.         IMPORT_CFM_FUNCTION ActivateTSMDocument
  536.     ENDIF
  537.  
  538. ;
  539. ; pascal OSErr DeactivateTSMDocument(TSMDocumentID idocID)
  540. ;
  541.     IF ¨ GENERATINGCFM THEN
  542.         Macro
  543.         _DeactivateTSMDocument
  544.             moveq               #3,D0
  545.             dc.w                $AA54
  546.         EndM
  547.     ELSE
  548.         IMPORT_CFM_FUNCTION DeactivateTSMDocument
  549.     ENDIF
  550.  
  551. ;
  552. ; pascal Boolean SetTSMCursor(Point mousePos)
  553. ;
  554.     IF ¨ GENERATINGCFM THEN
  555.         Macro
  556.         _SetTSMCursor
  557.             moveq               #6,D0
  558.             dc.w                $AA54
  559.         EndM
  560.     ELSE
  561.         IMPORT_CFM_FUNCTION SetTSMCursor
  562.     ENDIF
  563.  
  564. ;
  565. ; pascal OSErr FixTSMDocument(TSMDocumentID idocID)
  566. ;
  567.     IF ¨ GENERATINGCFM THEN
  568.         Macro
  569.         _FixTSMDocument
  570.             moveq               #7,D0
  571.             dc.w                $AA54
  572.         EndM
  573.     ELSE
  574.         IMPORT_CFM_FUNCTION FixTSMDocument
  575.     ENDIF
  576.  
  577. ;  Utilities 
  578. ;
  579. ; pascal OSErr UseInputWindow(TSMDocumentID idocID, Boolean useWindow)
  580. ;
  581.     IF ¨ GENERATINGCFM THEN
  582.         Macro
  583.         _UseInputWindow
  584.             moveq               #16,D0
  585.             dc.w                $AA54
  586.         EndM
  587.     ELSE
  588.         IMPORT_CFM_FUNCTION UseInputWindow
  589.     ENDIF
  590.  
  591.     ENDIF
  592.     IF FOR_SYSTEM7_ONLY THEN
  593. ;  Redundant Utilities 
  594. ;
  595. ; pascal OSErr SendAEFromTSMComponent(const AppleEvent *theAppleEvent, AppleEvent *reply, AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks, AEIdleUPP idleProc, AEFilterUPP filterProc)
  596. ;
  597.     IF ¨ GENERATINGCFM THEN
  598.         Macro
  599.         _SendAEFromTSMComponent
  600.             moveq               #11,D0
  601.             dc.w                $AA54
  602.         EndM
  603.     ELSE
  604.         IMPORT_CFM_FUNCTION SendAEFromTSMComponent
  605.     ENDIF
  606.  
  607. ;
  608. ; pascal OSErr NewServiceWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, ComponentInstance ts, WindowPtr *window)
  609. ;
  610.     IF ¨ GENERATINGCFM THEN
  611.         Macro
  612.         _NewServiceWindow
  613.             moveq               #17,D0
  614.             dc.w                $AA54
  615.         EndM
  616.     ELSE
  617.         IMPORT_CFM_FUNCTION NewServiceWindow
  618.     ENDIF
  619.  
  620. ;
  621. ; pascal OSErr CloseServiceWindow(WindowPtr window)
  622. ;
  623.     IF ¨ GENERATINGCFM THEN
  624.         Macro
  625.         _CloseServiceWindow
  626.             moveq               #18,D0
  627.             dc.w                $AA54
  628.         EndM
  629.     ELSE
  630.         IMPORT_CFM_FUNCTION CloseServiceWindow
  631.     ENDIF
  632.  
  633. ;
  634. ; pascal OSErr GetFrontServiceWindow(WindowPtr *window)
  635. ;
  636.     IF ¨ GENERATINGCFM THEN
  637.         Macro
  638.         _GetFrontServiceWindow
  639.             moveq               #19,D0
  640.             dc.w                $AA54
  641.         EndM
  642.     ELSE
  643.         IMPORT_CFM_FUNCTION GetFrontServiceWindow
  644.     ENDIF
  645.  
  646. ;
  647. ; pascal short FindServiceWindow(Point thePoint, WindowPtr *theWindow)
  648. ;
  649.     IF ¨ GENERATINGCFM THEN
  650.         Macro
  651.         _FindServiceWindow
  652.             moveq               #23,D0
  653.             dc.w                $AA54
  654.         EndM
  655.     ELSE
  656.         IMPORT_CFM_FUNCTION FindServiceWindow
  657.     ENDIF
  658.  
  659. ;
  660. ; pascal OSErr SetDefaultInputMethod(Component ts, ScriptLanguageRecord *slRecordPtr)
  661. ;
  662.     IF ¨ GENERATINGCFM THEN
  663.         Macro
  664.         _SetDefaultInputMethod
  665.             moveq               #12,D0
  666.             dc.w                $AA54
  667.         EndM
  668.     ELSE
  669.         IMPORT_CFM_FUNCTION SetDefaultInputMethod
  670.     ENDIF
  671.  
  672. ;
  673. ; pascal OSErr GetDefaultInputMethod(Component *ts, ScriptLanguageRecord *slRecordPtr)
  674. ;
  675.     IF ¨ GENERATINGCFM THEN
  676.         Macro
  677.         _GetDefaultInputMethod
  678.             moveq               #13,D0
  679.             dc.w                $AA54
  680.         EndM
  681.     ELSE
  682.         IMPORT_CFM_FUNCTION GetDefaultInputMethod
  683.     ENDIF
  684.  
  685. ;
  686. ; pascal OSErr SetTextServiceLanguage(ScriptLanguageRecord *slRecordPtr)
  687. ;
  688.     IF ¨ GENERATINGCFM THEN
  689.         Macro
  690.         _SetTextServiceLanguage
  691.             moveq               #14,D0
  692.             dc.w                $AA54
  693.         EndM
  694.     ELSE
  695.         IMPORT_CFM_FUNCTION SetTextServiceLanguage
  696.     ENDIF
  697.  
  698. ;
  699. ; pascal OSErr GetTextServiceLanguage(ScriptLanguageRecord *slRecordPtr)
  700. ;
  701.     IF ¨ GENERATINGCFM THEN
  702.         Macro
  703.         _GetTextServiceLanguage
  704.             moveq               #15,D0
  705.             dc.w                $AA54
  706.         EndM
  707.     ELSE
  708.         IMPORT_CFM_FUNCTION GetTextServiceLanguage
  709.     ENDIF
  710.  
  711. ;
  712. ; pascal Boolean TSMEvent(EventRecord *event)
  713. ;
  714.     IF ¨ GENERATINGCFM THEN
  715.         Macro
  716.         _TSMEvent
  717.             moveq               #4,D0
  718.             dc.w                $AA54
  719.         EndM
  720.     ELSE
  721.         IMPORT_CFM_FUNCTION TSMEvent
  722.     ENDIF
  723.  
  724. ;
  725. ; pascal Boolean TSMMenuSelect(long menuResult)
  726. ;
  727.     IF ¨ GENERATINGCFM THEN
  728.         Macro
  729.         _TSMMenuSelect
  730.             moveq               #5,D0
  731.             dc.w                $AA54
  732.         EndM
  733.     ELSE
  734.         IMPORT_CFM_FUNCTION TSMMenuSelect
  735.     ENDIF
  736.  
  737. ;
  738. ; pascal OSErr InitTSMAwareApplication(void )
  739. ;
  740.     IF ¨ GENERATINGCFM THEN
  741.         Macro
  742.         _InitTSMAwareApplication
  743.             moveq               #20,D0
  744.             dc.w                $AA54
  745.         EndM
  746.     ELSE
  747.         IMPORT_CFM_FUNCTION InitTSMAwareApplication
  748.     ENDIF
  749.  
  750. ;
  751. ; pascal OSErr CloseTSMAwareApplication(void )
  752. ;
  753.     IF ¨ GENERATINGCFM THEN
  754.         Macro
  755.         _CloseTSMAwareApplication
  756.             moveq               #21,D0
  757.             dc.w                $AA54
  758.         EndM
  759.     ELSE
  760.         IMPORT_CFM_FUNCTION CloseTSMAwareApplication
  761.     ENDIF
  762.  
  763. ;  Component Manager Interfaces to Input Methods 
  764. ;
  765. ; pascal ComponentResult GetScriptLanguageSupport(ComponentInstance ts, ScriptLanguageSupportHandle *scriptHdl)
  766. ;
  767.     IF ¨ GENERATINGCFM THEN
  768.         Macro
  769.         _GetScriptLanguageSupport
  770.             move.l              #$00040001,-(sp)
  771.             moveq               #0,D0
  772.             dc.w                $A82A
  773.         EndM
  774.     ELSE
  775.         IMPORT_CFM_FUNCTION GetScriptLanguageSupport
  776.     ENDIF
  777.  
  778. ;
  779. ; pascal ComponentResult InitiateTextService(ComponentInstance ts)
  780. ;
  781.     IF ¨ GENERATINGCFM THEN
  782.         Macro
  783.         _InitiateTextService
  784.             move.l              #$00000002,-(sp)
  785.             moveq               #0,D0
  786.             dc.w                $A82A
  787.         EndM
  788.     ELSE
  789.         IMPORT_CFM_FUNCTION InitiateTextService
  790.     ENDIF
  791.  
  792. ;
  793. ; pascal ComponentResult TerminateTextService(ComponentInstance ts)
  794. ;
  795.     IF ¨ GENERATINGCFM THEN
  796.         Macro
  797.         _TerminateTextService
  798.             move.l              #$00000003,-(sp)
  799.             moveq               #0,D0
  800.             dc.w                $A82A
  801.         EndM
  802.     ELSE
  803.         IMPORT_CFM_FUNCTION TerminateTextService
  804.     ENDIF
  805.  
  806. ;
  807. ; pascal ComponentResult ActivateTextService(ComponentInstance ts)
  808. ;
  809.     IF ¨ GENERATINGCFM THEN
  810.         Macro
  811.         _ActivateTextService
  812.             move.l              #$00000004,-(sp)
  813.             moveq               #0,D0
  814.             dc.w                $A82A
  815.         EndM
  816.     ELSE
  817.         IMPORT_CFM_FUNCTION ActivateTextService
  818.     ENDIF
  819.  
  820. ;
  821. ; pascal ComponentResult DeactivateTextService(ComponentInstance ts)
  822. ;
  823.     IF ¨ GENERATINGCFM THEN
  824.         Macro
  825.         _DeactivateTextService
  826.             move.l              #$00000005,-(sp)
  827.             moveq               #0,D0
  828.             dc.w                $A82A
  829.         EndM
  830.     ELSE
  831.         IMPORT_CFM_FUNCTION DeactivateTextService
  832.     ENDIF
  833.  
  834. ;
  835. ; pascal ComponentResult TextServiceEvent(ComponentInstance ts, short numOfEvents, EventRecord *event)
  836. ;
  837.     IF ¨ GENERATINGCFM THEN
  838.         Macro
  839.         _TextServiceEvent
  840.             move.l              #$00060006,-(sp)
  841.             moveq               #0,D0
  842.             dc.w                $A82A
  843.         EndM
  844.     ELSE
  845.         IMPORT_CFM_FUNCTION TextServiceEvent
  846.     ENDIF
  847.  
  848. ;
  849. ; pascal ComponentResult GetTextServiceMenu(ComponentInstance ts, MenuHandle *serviceMenu)
  850. ;
  851.     IF ¨ GENERATINGCFM THEN
  852.         Macro
  853.         _GetTextServiceMenu
  854.             move.l              #$00040007,-(sp)
  855.             moveq               #0,D0
  856.             dc.w                $A82A
  857.         EndM
  858.     ELSE
  859.         IMPORT_CFM_FUNCTION GetTextServiceMenu
  860.     ENDIF
  861.  
  862. ;
  863. ; pascal ComponentResult TextServiceMenuSelect(ComponentInstance ts, MenuHandle serviceMenu, short item)
  864. ;
  865.     IF ¨ GENERATINGCFM THEN
  866.         Macro
  867.         _TextServiceMenuSelect
  868.             move.l              #$00060008,-(sp)
  869.             moveq               #0,D0
  870.             dc.w                $A82A
  871.         EndM
  872.     ELSE
  873.         IMPORT_CFM_FUNCTION TextServiceMenuSelect
  874.     ENDIF
  875.  
  876. ;
  877. ; pascal ComponentResult FixTextService(ComponentInstance ts)
  878. ;
  879.     IF ¨ GENERATINGCFM THEN
  880.         Macro
  881.         _FixTextService
  882.             move.l              #$00000009,-(sp)
  883.             moveq               #0,D0
  884.             dc.w                $A82A
  885.         EndM
  886.     ELSE
  887.         IMPORT_CFM_FUNCTION FixTextService
  888.     ENDIF
  889.  
  890. ;
  891. ; pascal ComponentResult SetTextServiceCursor(ComponentInstance ts, Point mousePos)
  892. ;
  893.     IF ¨ GENERATINGCFM THEN
  894.         Macro
  895.         _SetTextServiceCursor
  896.             move.l              #$0004000A,-(sp)
  897.             moveq               #0,D0
  898.             dc.w                $A82A
  899.         EndM
  900.     ELSE
  901.         IMPORT_CFM_FUNCTION SetTextServiceCursor
  902.     ENDIF
  903.  
  904. ;
  905. ; pascal ComponentResult HidePaletteWindows(ComponentInstance ts)
  906. ;
  907.     IF ¨ GENERATINGCFM THEN
  908.         Macro
  909.         _HidePaletteWindows
  910.             move.l              #$0000000B,-(sp)
  911.             moveq               #0,D0
  912.             dc.w                $A82A
  913.         EndM
  914.     ELSE
  915.         IMPORT_CFM_FUNCTION HidePaletteWindows
  916.     ENDIF
  917.  
  918. ;
  919. ; pascal OSErr GetServiceList(short numOfInterface, OSType *supportedInterfaceTypes, TextServiceListHandle *serviceInfo, long *seedValue)
  920. ;
  921.     IF ¨ GENERATINGCFM THEN
  922.         Macro
  923.         _GetServiceList
  924.             moveq               #8,D0
  925.             dc.w                $AA54
  926.         EndM
  927.     ELSE
  928.         IMPORT_CFM_FUNCTION GetServiceList
  929.     ENDIF
  930.  
  931. ;
  932. ; pascal OSErr OpenTextService(TSMDocumentID idocID, Component aComponent, ComponentInstance *aComponentInstance)
  933. ;
  934.     IF ¨ GENERATINGCFM THEN
  935.         Macro
  936.         _OpenTextService
  937.             moveq               #9,D0
  938.             dc.w                $AA54
  939.         EndM
  940.     ELSE
  941.         IMPORT_CFM_FUNCTION OpenTextService
  942.     ENDIF
  943.  
  944. ;
  945. ; pascal OSErr CloseTextService(TSMDocumentID idocID, ComponentInstance aComponentInstance)
  946. ;
  947.     IF ¨ GENERATINGCFM THEN
  948.         Macro
  949.         _CloseTextService
  950.             moveq               #10,D0
  951.             dc.w                $AA54
  952.         EndM
  953.     ELSE
  954.         IMPORT_CFM_FUNCTION CloseTextService
  955.     ENDIF
  956.  
  957.     ENDIF
  958.     ENDIF ; __TEXTSERVICES__ 
  959.  
  960.